<template>
  <div class="single">
    <h6><i class="el-icon-s-operation handle"></i> 单选题 <i class="el-icon-delete" @click.stop="deleteQuestion"></i></h6>
    <p>{{element}}</p>
    <el-input v-model="val" @input="handle(i)"></el-input>
  </div>
</template>

<script>
export default {
  name: 'single',
  props: ['element', "i"],
  data () {
    return {
      val: ''
    }
  },
  methods: {
    deleteQuestion () {
      this.$emit('deleteQuestion', this.i)
    },
    handle (val) {
      console.log(123);
      this.$emit('send', val, { text: this.val })
    }
  }
}
</script>

<style lang="scss" scoped>
</style>